/**
 * 
 */
package com.google.code.rookery;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.google.code.rookery.converter.InstanceConverter;

/**
 * Annotate a method as a factory method for use by rookery.
 * @author Xerox
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface FactoryMethod {

  /**
   * An optional converter to convert one type of object into another.
   * @return the converter or a default InstanceConverter instance if not defined
   */
  Class<? extends InstanceConverter> converter() default InstanceConverter.class;

  /**
   * An optional array of converters to use during the factory method
   * @return the array of converters, which may be empty
   */
  Class<? extends InstanceConverter>[] converterList() default {};
}
